Jan Tojnar [Wed, 29 Apr 2020 05:42:38 +0000 (07:42 +0200)]
build: clean up .pc generation
Path concatenation is much nicer than the unwieldy format method.
Since paths returned by get_option are relative to prefix, they will be joined as before.
As a bonus, this fixes weird platforms like NixOS that actually pass absolute includedir under a different prefix.
Matthias Clasen [Wed, 29 Apr 2020 04:47:39 +0000 (04:47 +0000)]
Merge branch 'popup-positioning-fix' into 'master'
popover: Fix repositioning logic
See merge request GNOME/gtk!1792
Matthias Clasen [Wed, 29 Apr 2020 03:26:19 +0000 (23:26 -0400)]
popover: Fix repositioning logic
When the arrow changes position, we need to queue
an allocation to ensure that gtk_widget_allocate
actually calls our ->size_allocate vfunc.
Matthias Clasen [Wed, 29 Apr 2020 02:04:37 +0000 (02:04 +0000)]
Merge branch 'class-action-init' into 'master'
Reshuffle action muxer initialization
See merge request GNOME/gtk!1789
Matthias Clasen [Wed, 29 Apr 2020 00:55:01 +0000 (00:55 +0000)]
Merge branch 'drop-stack-homogeneous' into 'master'
Drop stack homogeneous
Closes #2673
See merge request GNOME/gtk!1791
Matthias Clasen [Wed, 29 Apr 2020 00:22:26 +0000 (20:22 -0400)]
Speed up class action hookup
No need to construct a detailed signal name for
every action when we can just look up the signal ID
once and use the quark that the GParamSpec already
has. Also, we don't need to loop over the actions
every time we get a notification.
Matthias Clasen [Tue, 28 Apr 2020 23:59:13 +0000 (19:59 -0400)]
builder-tool: Replace GtkStack:homogeneous
Replace this property by h/vhomogeneous.
Add a test.
Matthias Clasen [Tue, 28 Apr 2020 23:53:33 +0000 (19:53 -0400)]
Drop GtkStack:homogeneous
We have hhomogeneous and vhomogeneous properties
that can be set individually.
Fixes: #2673
Matthias Clasen [Tue, 28 Apr 2020 22:41:16 +0000 (22:41 +0000)]
Merge branch 'popup-controls-hiding' into 'master'
video: Don't hide the controls while the popup is shown
See merge request GNOME/gtk!1787
Matthias Clasen [Tue, 28 Apr 2020 22:34:23 +0000 (18:34 -0400)]
Reshuffle action muxer initialization
We were having a problem where property actions were
not getting state updates because prop_actions_connect
was triggered from some instance_init function while
the widget class is not in place yet.
Delay that call until the widget is fully constructed,
so we can guarantee that we are dealing with the
correct class private struct, and see all class actions.
Matthias Clasen [Tue, 28 Apr 2020 20:29:36 +0000 (20:29 +0000)]
Merge branch 'widget-factory-larger-logo' into 'master'
Widget factory larger logo
See merge request GNOME/gtk!1786
Matthias Clasen [Tue, 28 Apr 2020 19:11:26 +0000 (15:11 -0400)]
video: Don't hide the controls while the popup is shown
We don't get motion events from the popup (due to grabs),
so just don't hide as long as we're grab shadowed. This
makes the controls stay up until the volume popup is
dismissed.
Matthias Clasen [Tue, 28 Apr 2020 17:04:10 +0000 (13:04 -0400)]
Use a slightly larger version of the logo animation
This is large enough to not make the media controls
slider shrink to nothing.
Daniel Mustieles [Tue, 28 Apr 2020 15:49:39 +0000 (17:49 +0200)]
Updated Spanish translation
Emmanuele Bassi [Tue, 28 Apr 2020 14:11:55 +0000 (14:11 +0000)]
Merge branch 'drop-realize-invariant' into 'master'
Drop parent->realized => child->realized invariant
See merge request GNOME/gtk!1783
Emmanuele Bassi [Tue, 28 Apr 2020 13:06:26 +0000 (13:06 +0000)]
Merge branch 'ebassi/for-master' into 'master'
Ebassi/for master
See merge request GNOME/gtk!1782
Alexander Larsson [Tue, 28 Apr 2020 12:32:57 +0000 (14:32 +0200)]
Drop parent->realized => child->realized invariant
We already dropped this invariant in gtk_widget_verify_invariants()
because it was not true in all cases. Also, it is not really useful
these days as we extended what it means to be a "child" to also
include widgets in different toplevels.
For example, a popup in a popup button need not be realized just
because the button is in a realized window. The main invariants
we want are:
* Parent is realized before child
* Widget is realized before it is mapped
This sounds like its not a huge deal, but in fact it is a massive win
for things like menus, because when we go between menus in a menubar
each switch between two open menus involves a lot of intermingled
crossing events to different surfaces and for each of these the
tooltip window of the toplevel gets assigned to the new surface. This
shouldn't be a huge deal, as the tooltip window is not even visible,
but due to the realized invariant it get re-realized each time it gets
re-assigned.
Emmanuele Bassi [Mon, 27 Apr 2020 13:46:23 +0000 (14:46 +0100)]
Annotate more functions returning GListModel
Now that we can have an element-type annotation, we should use it where
needed.
Emmanuele Bassi [Tue, 28 Apr 2020 12:24:06 +0000 (13:24 +0100)]
Use attributes instead of element-type annotation
The `element-type` annotation is for GList and GSList only, and turns
out adding support for GListModel in gobject-introspection breaks Vala
and the GIR for GIO.
Instead of using `element-type`, we can use the `attributes` annotation,
which is ignored by code generators based on the GIR data.
Matthias Clasen [Tue, 28 Apr 2020 05:25:50 +0000 (05:25 +0000)]
Merge branch 'inspector-media' into 'master'
Inspector media
See merge request GNOME/gtk!1781
Matthias Clasen [Tue, 28 Apr 2020 04:37:00 +0000 (00:37 -0400)]
inspector: Show the media backend
Matthias Clasen [Tue, 28 Apr 2020 04:37:14 +0000 (00:37 -0400)]
mediafile: Privately export function to the extension
We want to show this information in the inspector.
Matthias Clasen [Tue, 28 Apr 2020 03:42:01 +0000 (03:42 +0000)]
Merge branch 'popover-flip-arrow-fix' into 'master'
popover: Allocate after setting final_position
Closes #2671
See merge request GNOME/gtk!1780
Matthias Clasen [Tue, 28 Apr 2020 01:55:24 +0000 (01:55 +0000)]
Merge branch 'menu-section-title-fixup' into 'master'
popovermenu: Don't put a separator before the first section
Closes #2672
See merge request GNOME/gtk!1779
Matthias Clasen [Tue, 28 Apr 2020 00:58:03 +0000 (20:58 -0400)]
popover: Allocate after setting final_position
When we find out that we've been flipped, set
final_position and final_rect before allocating
the popover. This prevents 'smashed-in beak' disease.
Fixes: #2671
Matthias Clasen [Tue, 28 Apr 2020 00:26:02 +0000 (20:26 -0400)]
popovermenu: Don't put a separator before the first section
When we have section titles, we were not hiding the
separator before the first section as we should;
fix this.
Fixes: #2672
Matthias Clasen [Mon, 27 Apr 2020 23:15:40 +0000 (23:15 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
widget-factory: Enable page transitions by default
See merge request GNOME/gtk!1777
Matthias Clasen [Mon, 27 Apr 2020 18:33:07 +0000 (14:33 -0400)]
widget-factory: Enable page transitions by default
No need to make this an easter egg.
Daniel Mustieles [Mon, 27 Apr 2020 16:14:43 +0000 (18:14 +0200)]
Updated Spanish translation
Matthias Clasen [Mon, 27 Apr 2020 13:22:47 +0000 (13:22 +0000)]
Merge branch 'BUG_filechooser_async_data_loss_GTK4' into 'master'
GtkFilechooserWidget: prevent oblivious selection of file
See merge request GNOME/gtk!1688
Matthias Clasen [Mon, 27 Apr 2020 12:59:35 +0000 (12:59 +0000)]
Merge branch 'wip/exalm/tnum' into 'master'
mediacontrols: Use tabular figures for time and duration
See merge request GNOME/gtk!1774
Alexander Mikhaylenko [Mon, 27 Apr 2020 12:28:20 +0000 (17:28 +0500)]
mediacontrols: Use tabular figures for time and duration
In particular, this prevents gtk4-widget-factory from jumping every
second.
Matthias Clasen [Mon, 27 Apr 2020 12:16:54 +0000 (12:16 +0000)]
Merge branch '2657-avoid-use-after-free-suggestion' into 'master'
Resolve "Use-after-free crash in `thaw_updates()`"
Closes #2657
See merge request GNOME/gtk!1771
Matthias Clasen [Mon, 27 Apr 2020 12:11:37 +0000 (12:11 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Miscellaneous bug fixes
Closes #2666 and #2016
See merge request GNOME/gtk!1773
Matthias Clasen [Mon, 27 Apr 2020 04:35:47 +0000 (00:35 -0400)]
filechooser: Correct an annotation
Clarify that gtk_file_chooser_add_filter is only taking
ownership of a floating reference, which translates to
"transfer none", not "transfer full".
Fixes: #2016
Matthias Clasen [Mon, 27 Apr 2020 04:23:49 +0000 (00:23 -0400)]
placesview: Fix translator comments
These comments were applied to the wrong strings
by xgettext.
Fixes: #2666
Matthias Clasen [Mon, 27 Apr 2020 04:13:46 +0000 (00:13 -0400)]
filechooser: Fix type-to-search
We need to capture the keys and forward them
to the search entry, for anything to happen.
Matthias Clasen [Mon, 27 Apr 2020 03:30:30 +0000 (03:30 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!1772
Matthias Clasen [Mon, 27 Apr 2020 02:30:34 +0000 (22:30 -0400)]
widget-factory: Revamp transition effects
Use a quick crossfade for the main pages, and use
the rotation for the small stack on page 2, where
it looks less out of place.
Matthias Clasen [Mon, 27 Apr 2020 02:14:10 +0000 (22:14 -0400)]
gtk-demo: Add a shortcuts window
Its not very impressive here, but still good to have.
Matthias Clasen [Mon, 27 Apr 2020 01:59:28 +0000 (21:59 -0400)]
icon-browser: Add a gear menu
Add an about dialog, and make the inspector available.
Matthias Clasen [Mon, 27 Apr 2020 01:13:16 +0000 (21:13 -0400)]
widget-factory: Improve the textview on page 3
Remove an extra frame, make the buttons linked, and
add tooltips.
Matthias Clasen [Mon, 27 Apr 2020 00:54:09 +0000 (20:54 -0400)]
widget-factory: Move the password entry
Move the password entry to the other entries. That
fits the overall organization better, and makes all
the typographical styles fit.
Matthias Clasen [Mon, 27 Apr 2020 00:35:51 +0000 (20:35 -0400)]
widget-factory: Make the list on page 2 grow to the bottom
Add a few more items to the list to make it fill up the space.
Matthias Clasen [Mon, 27 Apr 2020 00:23:52 +0000 (20:23 -0400)]
widget-factory: Show typographical style classes
This nicely fills the gap on page 1.
Matthias Clasen [Mon, 27 Apr 2020 00:02:10 +0000 (20:02 -0400)]
gtk-demo: Include pango version in about dialog
This is useful information.
Matthias Clasen [Mon, 27 Apr 2020 00:01:31 +0000 (20:01 -0400)]
widget-factory: Include pango version in about dialog
This is useful information.
Matthias Clasen [Sun, 26 Apr 2020 23:34:36 +0000 (19:34 -0400)]
widget-factory: Add a password entry
Thats a new widget that was missing.
Emmanuele Bassi [Sun, 26 Apr 2020 21:42:10 +0000 (21:42 +0000)]
Merge branch 'patch-1' into 'master'
Remove a "-" from comment
See merge request GNOME/gtk!1770
Peter Bloomfield [Sun, 26 Apr 2020 21:38:49 +0000 (17:38 -0400)]
file-system-model: Refactor a helper
Push more common code into the helper for
gtk_file_system_model_query_done() and
gtk_file_system_model_one_query_done().
Peter Bloomfield [Sat, 25 Apr 2020 21:26:22 +0000 (17:26 -0400)]
file-system-model: Avoid use-after free
This is a possible fix for https://gitlab.gnome.org/GNOME/gtk/-/issues/2657
Use a NULL return from g_file_query_info_finish() to detect cancellation
of the query, and avoid derferencing a stale pointer.
scootergrisen [Sun, 26 Apr 2020 20:44:04 +0000 (20:44 +0000)]
Remove a "-"
Matthias Clasen [Sun, 26 Apr 2020 20:24:37 +0000 (20:24 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!1768
Matthias Clasen [Sun, 26 Apr 2020 19:48:46 +0000 (15:48 -0400)]
stackswitcher: Drop the Private struct
Matthias Clasen [Sun, 26 Apr 2020 19:44:44 +0000 (15:44 -0400)]
progressbar: Drop the Private struct
Matthias Clasen [Sun, 26 Apr 2020 19:37:47 +0000 (15:37 -0400)]
overlay: Drop the Private struct
Matthias Clasen [Sun, 26 Apr 2020 19:31:14 +0000 (15:31 -0400)]
linkbutton: Drop the Private struct
Matthias Clasen [Sun, 26 Apr 2020 19:26:50 +0000 (15:26 -0400)]
fontchooserdialog: Drop the Private struct
Matthias Clasen [Sun, 26 Apr 2020 19:23:21 +0000 (15:23 -0400)]
fontchooserwidget: Drop the Private struct
Matthias Clasen [Sun, 26 Apr 2020 19:14:09 +0000 (15:14 -0400)]
calendar: Drop the Private struct
Matthias Clasen [Sun, 26 Apr 2020 19:06:44 +0000 (15:06 -0400)]
separator: Drop the Private struct
Matthias Clasen [Sun, 26 Apr 2020 19:02:16 +0000 (15:02 -0400)]
viewport: Drop the Private struct
Matthias Clasen [Sun, 26 Apr 2020 19:20:47 +0000 (19:20 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
widget-factory improvements
See merge request GNOME/gtk!1767
Matthias Clasen [Sun, 26 Apr 2020 18:42:45 +0000 (14:42 -0400)]
wayland: Fall back to an unthemed default cursor
In the absence of icon themes (such as in a freshly
created toolbox container), we should not just fall back
to "no cursor", since that makes it hard even to close
the application. Fall back to an included default cursor
of last resort.
Matthias Clasen [Sun, 26 Apr 2020 18:41:52 +0000 (14:41 -0400)]
gdk: Include a default cursor as resource
Provide a fallback cursor of last resort. Otherwise,
we end up with no visible cursor if there is no
cursor theme installed, wihch is less than helpful.
Matthias Clasen [Sun, 26 Apr 2020 17:40:23 +0000 (13:40 -0400)]
vulkan: Update error codes enum
Do the silly update exercise.
Matthias Clasen [Sun, 26 Apr 2020 15:39:26 +0000 (11:39 -0400)]
widget-factory: Put a video widget in
The designers wanted the frame column gone for a long
time, since inset/outset/groove etc are not the coolest
features anymore.
Keep one frame, and put a GtkVideo in it.
This opens up some real estate on page 1. Suggestions
welcome for how to fill it.
Matthias Clasen [Sun, 26 Apr 2020 15:25:23 +0000 (11:25 -0400)]
inspector: Make the resource tab play videos
We can do this easily, so why not. This can be
seen in action with gtk-logo.webm, e.g. in gtk4-demo.
Matthias Clasen [Sun, 26 Apr 2020 14:44:55 +0000 (10:44 -0400)]
widget-factory: Implement the print action
Implement enough here to show a print dialog.
Matthias Clasen [Sun, 26 Apr 2020 16:11:49 +0000 (16:11 +0000)]
Merge branch 'wip/exalm/windowcontrols-fix' into 'master'
Adwaita: remove margin from GtkWindowControls when empty
See merge request GNOME/gtk!1766
Alexander Mikhaylenko [Sun, 26 Apr 2020 15:24:20 +0000 (20:24 +0500)]
Adwaita: remove margin from GtkWindowControls when empty
Matthias Clasen [Sun, 26 Apr 2020 14:19:44 +0000 (10:19 -0400)]
widget-factory: Make print a window action
We want to pass the parent window when opening
a print dialog, so this is naturally a window
action.
Matthias Clasen [Sun, 26 Apr 2020 14:30:10 +0000 (14:30 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
More reftest fixes
See merge request GNOME/gtk!1765
Matthias Clasen [Sun, 26 Apr 2020 14:02:11 +0000 (10:02 -0400)]
widget-factory: Some cosmetics
Hook the Print button on page 3 up to the app.print
action. This doesn't do anything now, but we might
use it to show a print dialog.
Matthias Clasen [Sun, 26 Apr 2020 14:00:14 +0000 (10:00 -0400)]
widget-factory: Improve the layout on page 3
Make the entries in the third column expand,
to align things.
Matthias Clasen [Sun, 26 Apr 2020 13:18:54 +0000 (09:18 -0400)]
reftests: Remove window-show-contents-on-map from xfails
This test passes now.
Matthias Clasen [Sun, 26 Apr 2020 13:16:25 +0000 (09:16 -0400)]
reftests: Fix the window-show-contents-on-map test
Despite the name, the test was not in fact showing
contents on map anymore, since widgets are visible
by default. Setting visible to FALSE makes the test
work as expected again.
Matthias Clasen [Sun, 26 Apr 2020 13:18:54 +0000 (09:18 -0400)]
reftests: Remove window-show-contents-on-map from xfails
This test passes now.
Matthias Clasen [Sun, 26 Apr 2020 13:17:42 +0000 (13:17 +0000)]
Merge branch 'clipboard-demo-fixes' into 'master'
More gtk-demo fixes
See merge request GNOME/gtk!1764
Matthias Clasen [Sun, 26 Apr 2020 13:16:25 +0000 (09:16 -0400)]
reftests: Fix the window-show-contents-on-map test
Despite the name, the test was not in fact showing
contents on map anymore, since widgets are visible
by default. Setting visible to FALSE makes the test
work as expected again.
Matthias Clasen [Sun, 26 Apr 2020 13:09:35 +0000 (13:09 +0000)]
Merge branch 'wip/exalm/titlebuttons' into 'master'
GtkWindowControls + GtkHeaderBar cleanups
See merge request GNOME/gtk!1755
Alexander Mikhaylenko [Sat, 25 Apr 2020 19:34:19 +0000 (00:34 +0500)]
docs: Add GtkWindowControls to docs
Alexander Mikhaylenko [Fri, 24 Apr 2020 15:55:43 +0000 (20:55 +0500)]
headerbar: Use GtkWindowControls
Now that the title buttons are encapsulated in a separate widget, use
it in the header bar.
Hide them when empty, so that they don't add extra spacing.
Alexander Mikhaylenko [Fri, 24 Apr 2020 12:56:52 +0000 (17:56 +0500)]
Add GtkWindowControls
Move some code out of GtkHeaderBar and into a separate widget, making it
reusable in process.
See https://gitlab.gnome.org/GNOME/gtk/issues/2242
Matthias Clasen [Sun, 26 Apr 2020 04:45:06 +0000 (00:45 -0400)]
widget-factory: Update copyright year
Matthias Clasen [Sun, 26 Apr 2020 04:44:48 +0000 (00:44 -0400)]
gtk-demo: Update copyright year
Matthias Clasen [Sun, 26 Apr 2020 04:09:31 +0000 (00:09 -0400)]
gtk-demo: Remove the colorsel demo
We already have a color selector demo in "Pickers".
Matthias Clasen [Sun, 26 Apr 2020 03:33:33 +0000 (23:33 -0400)]
gtk-demo: Minor cosmetic fixes
Some minor cosmetic fixes to some of the demos.
Matthias Clasen [Sun, 26 Apr 2020 02:14:25 +0000 (22:14 -0400)]
gtk-demo: Improve the dnd demo
The DND demo didn't have DND, since it was first created!
Time to fix this. Copying most of testdnd3.c here.
Matthias Clasen [Sun, 26 Apr 2020 02:13:33 +0000 (02:13 +0000)]
Merge branch 'clipboard-demo-fixes' into 'master'
Clipboard demo fixes
See merge request GNOME/gtk!1762
Matthias Clasen [Sun, 26 Apr 2020 01:16:02 +0000 (21:16 -0400)]
gtk-demo: Polish the clipboard demo
The DND part of this demo was broken by recent
icon theme changes. Make it work again.
And make the demo nicer by breaking out a
DemoImage widget.
Matthias Clasen [Sun, 26 Apr 2020 01:03:57 +0000 (21:03 -0400)]
Move the idle sizer to the gtkroot.c
This is needed since we already have a second GtkRoot
implementation with GtkDragIcon, and DND is causing
critical warnings due to this.
Matthias Clasen [Sat, 25 Apr 2020 19:26:36 +0000 (19:26 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!1761
Matthias Clasen [Sat, 25 Apr 2020 17:26:14 +0000 (13:26 -0400)]
reftests: Remove background-image-multiple from xfails
It no longer fails.
Matthias Clasen [Sat, 25 Apr 2020 17:18:34 +0000 (13:18 -0400)]
fixed: Fix an oversight in size requisition
We need to take orientation into account when applying
child transforms. This is what broke the background-image-multiple
reftest.
Matthias Clasen [Sat, 25 Apr 2020 16:56:18 +0000 (16:56 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Fix menu keynav
See merge request GNOME/gtk!1760
Matthias Clasen [Sat, 25 Apr 2020 16:47:17 +0000 (12:47 -0400)]
reftests: Use transform syntax
This is supposed to fix the background-image-multiple
reftest, but it doesn't. There's an actual bug here.
Matthias Clasen [Sat, 25 Apr 2020 16:14:04 +0000 (12:14 -0400)]
menu: Dismiss submenus during keynav
We need to dismiss submenus explicitly on left arrow,
otherwise the grab interferes with our keynav.
Matthias Clasen [Sat, 25 Apr 2020 15:54:29 +0000 (11:54 -0400)]
Cosmetics
Reduce casting.
Matthias Clasen [Sat, 25 Apr 2020 15:46:43 +0000 (11:46 -0400)]
menu: Ignore leaves due to grabs
When we open a submenu we get a leave due to the grab,
but we don't want to unset the active item then.